from lib import log
        
class WorldObject(object):
    def __init__(self, world):
        self._world = world
        log.debug("Object {0} created with id={1}".format(self.__class__.__name__, hex(id(self))))
    
    @property
    def world(self): return self._world
    
    def notifyWorld(self, s):
        log.warn("object id={0} just notified the world: {1}".format(id(self), s))
        world.notifyAll(s)
    
    @property
    def isThing(self): return False
    @property
    def isLiving(self): return False
    @property
    def isPlayer(self): return False
    